Repository navigation
ijai: extend Pro2Vacuum (ijai.vacuum.v3) with map info and more controls - #2103
Draft
duvanjamid wants to merge 1 commit into
Draft
duvanjamid wants to merge 1 commit into
duvanjamid wants to merge 1 commit into
Conversation
Add read-only map info (map_status, get_maps) and more of the controls exposed by the MIoT spec of ijai.vacuum.v3: cleaning modes, room cleaning, water level, mop route, repeat, tank vibration, volume, locate, DND, consumable reset and manual control. Extend status() with the matching readable properties. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2103 +/- ##
==========================================
+ Coverage 84.31% 84.47% +0.15%
==========================================
Files 201 201
Lines 20656 20883 +227
Branches 1121 1125 +4
==========================================
+ Hits 17417 17641 +224
- Misses 3047 3048 +1
- Partials 192 194 +2 ☔ View full report in Codecov by Harness. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends
Pro2Vacuum(Mi Robot Vacuum-Mop 2 Pro,ijai.vacuum.v3) using the public MIoT spec of the model. Follow-up of the (closed) #1388, where the model was reported as unsupported; basic support already exists on master.Added
map_status()(current map id, number of maps, new-map flag) andget_maps()(stored maps: name, id, cur). They are not part of the_MAPPINGS, sostatus()does not request them on every poll.start_sweep(),start_sweep_mop(),start_mop(),start_rooms(room_ids).set_sweep_mode,set_water_level,set_mop_route,set_repeat,set_tank_shake,set_tank_shake_level,set_volume,set_dnd.locate(),reset_consumable(),manual_control().status()now also reports repeat state, door state, mop route, time zone, tank vibration (+ level), volume and do-not-disturb window.Testing
test_pro2vacuum.py).ijai.vacuum.v3(firmware as reported by Mi Home 11.9.x), read-only:status(),map_status()andget_maps()return sane values.chunmi/cooker_multi) with and without this change on my machine (Python 3.14).Not verified on hardware (why this is a draft)
start_rooms: room ids are sent as a comma separated string ("10,12") in piid 10 of siid 2 aiid 7; the spec only says "string".set_dnd: the time zone (piid 6) is taken from the device (time_zone, siid 7 piid 20).manual_control,reset_consumable, the setters and the start commands were only tested against the dummy device, because they move the robot or change its configuration.Not included
Zone/point cleaning, virtual walls, schedules and cleaning preferences: the string formats are not documented in the spec. Map decoding is also out of scope (the map is uploaded to the Xiaomi cloud, encrypted; see
vacuum-map-parser-ijai).Happy to adjust anything or split this into smaller PRs.